package com.nxy.cpfsfe.util;

import com.adtec.starring.util.SpringUtil;
import com.nxy.cpfsfe.mybatis.mapper.ToPChlMapper;
import com.nxy.cpfsfe.mybatis.pojo.ToPChl;
import org.apache.ibatis.session.SqlSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * 
 * 渠道表工具类
 * @author nxygyzd
 *
 */
public class ToPChlUtil {
	//初始化对象
	private static ToPChlUtil toPChlUtil = new ToPChlUtil();
	//构造函数私有化
	private ToPChlUtil(){
		
	}
	//公开获取单例对象函数
	public static ToPChlUtil getInstance(){
		
		 return toPChlUtil;
	}
	
	private final static Logger LOGGER = LoggerFactory.getLogger(ToPChlUtil.class);
	SqlSession sqlSession =  (SqlSession) SpringUtil.getBean("mybatisSqlSession");

	/**
	 * 获取渠道信息
	 * @param pCId
	 * @return
	 */
	public ToPChl getToPChlByPcId(String pCId) {
		ToPChl toPChl= null;
		ToPChlMapper tbAMapper = sqlSession.getMapper(ToPChlMapper.class);
		toPChl =tbAMapper.queryByPCId(pCId);
		return toPChl;
	}

	

}
